package com.mr.security.web.commons.exception;


import com.mr.security.web.commons.utils.ConstantEnum;

/**
 * @ClassName: CustomException
 * @User MRui
 * @Description: TODO描述：自定义异常
 * @date 2018.09.20 23:00
 */
public class CustomException extends RuntimeException {

    private int code;

    public CustomException(ConstantEnum constantEnum){
        super(constantEnum.getMessage());
        this.code = constantEnum.getCode();
    }
    public CustomException(int code,String message){
        super(message);
        this.code = code;
    }
}
